package cate.game.role.bag.storehouse.msg;

import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgOutput;
import cate.game.client.msg.id.MsgIdBBag;
import cate.game.role.bag.item.BaseBagItem;
import cate.game.role.bag.item.msg.ItemAddResp;
import cate.game.role.bag.prop.Prop;
import easy.java.dev.note.NoteField;

import java.util.ArrayList;
import java.util.List;

@ClientMsg(title = "道具仓库增加道具")
public class PropStorehouseAddResp extends ItemAddResp<PropStorehouseAddResp> implements MsgOutput {
    @NoteField(value = "新增的道具")
    public List<Prop> list = new ArrayList<>();

    @Override
    public MsgConfig conf() {
        return MsgIdBBag.PROP_STORE_ADD_RESP;
    }

    @Override
    public void add(BaseBagItem item) {
        list.add((Prop)item);
    }

    @Override
    public boolean merge(PropStorehouseAddResp another) {
        this.list.addAll(another.list);
        return true;
    }

    public PropStorehouseAddResp() {
    }
}
